import { HashMap } from "../../api/struct/HashMap";
import { CDEquipment } from "../excel/CDEquipment";


/**
 * 扩展-套装
 */
export abstract class CESuit {

    /**数据-套装组合 k-suitID, v-equipmentIDList */
    public static suitMap = new HashMap<number, number[]>();

    /**初始化 */
    public static init(): void {
        const vs = CDEquipment.datas.getValues();
        for (let i = 0, len = vs.length; i < len; i++) {
            if (vs[i].suit === 0) {
                continue;
            }
            let list = this.suitMap.get(vs[i].suit);
            if (!list) {
                list = [];
                this.suitMap.put(vs[i].suit, list);
            }
            list.push(vs[i].id);
        }
    }
}